﻿@model Capokun.Models.Song
@{
    Layout = "~/Views/Shared/_Layout_fr-FR.cshtml";
    if (Model != null)
    {
        ViewBag.Title = Model.SongId;

        ViewBag.ogTitle = Model.SongId;
        ViewBag.ogType = "song";
        //ViewBag.ogUrl = "http://www.capokun.com/fr-FR/songs/" + Model.SongId;
        ViewBag.ogUrl = "http://www.capokun.com/fr-FR/songs/" + HttpUtility.UrlPathEncode(Model.SongId);
        ViewBag.ogDescription = Capokun.Tools.HtmlRemoval.StripTagsRegex(Model.Content);
    }
    else
    {
        ViewBag.Title = "Chanson introuvable";
    }
}
<section id="contentSongList" class="body">
    <script>
        $(function () {
            $("#tabs").tabs();
        });
        $(document).ready(function () {
            $('a[href|="#tabs-1"]').click(function () {
                window.location = "@Url.Action("All")";
            });
            $('a[href|="#tabs-2"]').click(function () {
                window.location = "@Url.Action("Favorites")";
            });
            $('a[href|="#tabs-3"]').click(function () {
                window.location = "@Url.Action("Create")";
            });
        });
    </script>
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Tous</a></li>
            <li><a href="#tabs-2">Favoris</a></li>
            <li><a href="#tabs-3">Créer une nouvelle chanson</a></li>
        </ul>
        <div id="tabs-1">
            <div id="ModelContent">
            </div>
            @if (Model != null)
            {
                <script>
                    var ModelJson = {
                        "SongId": "@Model.SongId",
                        "SubmittedBy": "@Model.SubmittedBy"
                    };
                    var htmlContent = createMVCContent(ModelJson);
                    $("#ModelContent").html(htmlContent);
                </script>
                
                <h2>
                    @Model.SongId
                    @if (!string.IsNullOrEmpty(Model.SongId_fr))
                    {
                        <span style="font-size: 0.7em">(@Model.SongId_fr)</span>
                    }
                </h2>
                @Html.Raw(Model.Link)
                <br />
                <div class="editor-labelTwoCols">
                    <div class="editor-label">
                        <h3>
                            Portugais</h3>
                    </div>
                    <div class="editor-label">
                        <h3>
                            Français</h3>
                    </div>
                </div>
                <div class="contentTwoCols">
                    <div>@Html.Raw(Model.Content)</div>
                    <div>
                        @if (string.IsNullOrEmpty(Model.Content_fr))
                        {
                            <p>
                                <i>Traduction pas encore faîte.<br />
                                    @Html.ActionLink("Ajoute une traduction", "Edit/" + Model.SongId, "Song")
                                </i>
                            </p>
                        }
                        else
                        {
                            @Html.Raw(Model.Content_fr);
                        }
                    </div>
                </div>
                <br />
                <div data-href="http://www.capokun.com/fr-FR/songs/@Model.SongId"
                 class="fb-like" data-send="false" data-width="450" data-show-faces="true">
                </div>
            }
            else
            {
                <p>
                    Chanson introuvable</p>
            }
        </div>
        <div id="tabs-2">
        </div>
        <div id="tabs-3">
        </div>
    </div>
</section>
<section id="contentMobile" class="body">
    Mobile device detected!
<br /> <a href="@Url.Content("~/App_EN.htm")" >let's go to the mobile song application
    here</a>
</section>
